Skip to content

Conversation

@rozeo
Copy link
Contributor

@rozeo rozeo commented Jun 12, 2025

see more details: open-telemetry/opentelemetry-php#1630
I checked to see if other functions were also affected, but only this function was affected.

Closes: open-telemetry/opentelemetry-php#1630

@rozeo rozeo requested a review from a team as a code owner June 12, 2025 05:34
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jun 12, 2025

CLA Signed


The committers listed above are authorized under a signed CLA.

@codecov
Copy link

codecov bot commented Jun 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.12%. Comparing base (1d5099d) to head (a233f08).
Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main     #390      +/-   ##
============================================
+ Coverage     82.82%   83.12%   +0.29%     
  Complexity     1948     1948              
============================================
  Files           142      142              
  Lines          8142     8143       +1     
============================================
+ Hits           6744     6769      +25     
+ Misses         1398     1374      -24     
Flag Coverage Δ
Aws 92.59% <ø> (ø)
Context/Swoole 0.00% <ø> (ø)
Instrumentation/AwsSdk 81.13% <ø> (ø)
Instrumentation/CakePHP 20.40% <ø> (ø)
Instrumentation/CodeIgniter 73.55% <ø> (ø)
Instrumentation/Curl 90.42% <ø> (ø)
Instrumentation/Doctrine 92.72% <ø> (ø)
Instrumentation/ExtAmqp 88.48% <ø> (ø)
Instrumentation/ExtRdKafka 86.11% <ø> (ø)
Instrumentation/Guzzle 75.58% <ø> (ø)
Instrumentation/HttpAsyncClient 78.04% <ø> (ø)
Instrumentation/IO 70.68% <ø> (ø)
Instrumentation/Laravel 66.82% <100.00%> (+2.90%) ⬆️
Instrumentation/MongoDB 74.28% <ø> (ø)
Instrumentation/MySqli 95.81% <ø> (ø)
Instrumentation/OpenAIPHP 87.21% <ø> (ø)
Instrumentation/PDO 94.21% <ø> (ø)
Instrumentation/Psr14 76.47% <ø> (ø)
Instrumentation/Psr15 89.15% <ø> (ø)
Instrumentation/Psr16 97.50% <ø> (ø)
Instrumentation/Psr18 77.46% <ø> (ø)
Instrumentation/Psr3 67.01% <ø> (ø)
Instrumentation/Psr6 97.61% <ø> (ø)
Instrumentation/ReactPHP 99.45% <ø> (ø)
Instrumentation/Slim 86.11% <ø> (ø)
Instrumentation/Symfony 84.74% <ø> (ø)
Instrumentation/Yii 77.50% <ø> (ø)
Logs/Monolog 100.00% <ø> (ø)
Propagation/Instana 98.11% <ø> (ø)
Propagation/ServerTiming 100.00% <ø> (ø)
Propagation/TraceResponse 100.00% <ø> (ø)
ResourceDetectors/Azure 91.66% <ø> (ø)
ResourceDetectors/Container 93.02% <ø> (ø)
ResourceDetectors/DigitalOcean 100.00% <ø> (ø)
Sampler/RuleBased 33.51% <ø> (ø)
Shims/OpenTracing 92.45% <ø> (ø)
Symfony 87.81% <ø> (ø)
Utils/Test 87.53% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...l/src/Hooks/Illuminate/Database/Eloquent/Model.php 82.22% <100.00%> (+13.50%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d5099d...a233f08. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rozeo
Copy link
Contributor Author

rozeo commented Jun 12, 2025

I am still checking about the CLA... done!

updated_at DATETIME
)');

$this->router()->get('/eloquent', function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason to use the HTTP kernel to test model functionality? 🤔

Copy link
Contributor Author

@rozeo rozeo Jun 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for review!

The main reason is to test in the same way as much as possible, because test cases with similar intentions were defined in other cases and added as additional cases, but as you reviewed, the TraceProvider setting is done on the TestCase class, so it seems that the test itself is possible without going through the HTTP kernel.
However, it is defined as an integration test, I personally think the current way makes more sense, since the test is to be conducted in the same way as the actual use case and a database is required in this case.
But a little redundant.

If a better testing method is exists, I will be create a new PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rozeo - we can split these out later then 👍

@rozeo rozeo requested a review from ChrisLightfootWild June 17, 2025 12:08
@brettmc brettmc merged commit a3fb3a4 into open-telemetry:main Jun 17, 2025
148 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[opentelemetry-php-contrib] openentelemetry-auto-laravel threw warning on \Illuminate\Database\Eloquent\Model::destroy called.

3 participants